<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">班级说说</a>
        </div>
        <ul class="nav navbar-nav">
            <li <%if(active=="首页"){%> class="active" <%}%> ><a href="/">全部说说<span class="sr-only">(current)</span></a></li>
            <%if(login){%>
            <li <%if(active=="我的说说"){%> class="active" <%}%>><a href="/user/<%= username%>">我的说说</a></li>
            <%}%>
            <li <%if(active=="成员列表"){%> class="active" <%}%>><a href="/userlist">成员列表</a></li>
        </ul>
        <%
        if(!login){
        %>

        <ul class="nav navbar-nav navbar-right">
            <li <%if(active=="注册"){%> class="active" <%}%> ><a href="/regist">注册</a></li>
            <li <%if(active=="登录"){%> class="active" <%}%> ><a href="/login">登录</a></li>
        </ul>
        <%
        }else{
        %>
        <ul class="nav navbar-nav navbar-right">
            <li><a>欢迎您：<%=username%></a></li>
            <li><a>设置个人资料</a></li>
            <li><a href="/login">切换账号</a></li>
        </ul>
        <%
        }
        %>
    </div>
</nav>
